package com.fare.fdc.listener;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import com.dayatang.domain.InstanceFactory;
import com.fare.taluo.application.system.auth.UserInfoLogApplication;
import com.fare.taluo.auth.security.LogonUserCertificate;

public class UserOnlineListener implements HttpSessionListener {
	
	private LogonUserCertificate user;
	
	@Override
	public void sessionCreated(HttpSessionEvent se) {
		
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent se) {
		//当监听器失效时，更新用户状态
		InstanceFactory.getInstance(UserInfoLogApplication.class).updateVo(user);
	}

	public void setUser(LogonUserCertificate user) {
		this.user = user;
	}


	
}
